﻿// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'

Shader "LineColor" {

    Properties{
        _LineColor("Line Color", Color) = (1.0, 1.0, 1.0, 1.0)
    }

        SubShader{
            Pass {
                Tags { "RenderType" = "Opaque"}
                CGPROGRAM

                #pragma vertex vert
                #pragma fragment frag

                #include "UnityCG.cginc"

                struct a2v
                {
                    half4 pos : POSITION;
                    fixed4 color : COLOR;
                };

                struct v2f
                {
                    half4 pos : SV_POSITION;
                    fixed4 color : COLOR;
                };

                fixed4 _LineColor;

                v2f vert(a2v  v)
                {
                    v2f o;
                    o.pos = UnityObjectToClipPos(v.pos);
                    o.color = v.color;
                    return o;
                }

                fixed4 frag(v2f i) : COLOR
                {
                    return _LineColor * i.color;
                }

                ENDCG
            }
    }
}